home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 24 / Mac Magazin and MacEasy Magazine CD - Issue 24.iso / Wissenschaft & Technik / Survival 6.1.3. Pack / Survival Last Changes.txt < prev    next >
Text File  |  1994-06-29  |  19KB  |  304 lines

  1. SURVIVAL HISTORY
  2.  
  3. This File is a brief summary of changes and enhancements to Survival since it
  4. came to light for the very first time.
  5.  
  6. SURVIVAL 6.0.2 
  7.  
  8. •Median of survival with 95% IC is now estimated and printed for the different groups.
  9.  
  10. •Now if you double-click on a Text File or a Binary File created by the program the
  11. application is launched an the selected file is automatically loaded and opened.
  12.  
  13. •If you try to select a variable that has the same value than the Status variable or
  14. the Time variable you get three beeps and the corresponding box flashes to warn you up.
  15.  
  16. • If you press the Option key down while selecting the Help item from the Apple menu,
  17. a full description of the available macro commands is displayed in the Help window,
  18. which may be printed with the Print option of the File Menu. If you don't press the
  19. Option key a Help window with a general description about the program and the different Menu options is displayed. The Help window and Macro window  are displayed now in styled Text for easy reading and its content updated to reflect the changes introduced in  the newer versions.
  20.  
  21. • If the Option key is pressed while launching the application, a macro file is loaded
  22. in memory and the macro located in second position in the macro menu is automatically
  23. executed. The first position is left to allow the user to define a function for time-
  24. dependent survival analysis. The file should be named 'Survival Macros' and must be
  25. located in the same folder than the application. If you don't press the Option key
  26. the file is just loaded to be used from the Macros Menu.
  27. This option allows to link Survival with your current database for fully automated
  28. survival analysis.
  29.  
  30. • The MAKEBINS macro now lists the number of cases in each bin.
  31.  
  32. • if the CONTROL key is pressed while selecting a covariate in the variable window of
  33. the DEFINE MODEL dialog a (c) sign appears in the rightmost side of the variable in the model window.
  34. This option ENABLES the internal transformation of categorical variables into K-1 INDICATOR or DEVIATION variables, where K is the max number of categories of the selected variable. 
  35. If you want to use coding DEVIATION coding scheme, uncheck the 'USE INDICATOR VARIABLES' box.
  36. You may obtain the same results with the TRANSFORM option of the MODEL menu  but you have to manuallay include the different variables in the model.
  37. In the output window the coefficientes are labeled as VAR1-1, VAR1-2,  etc. or as NAME-1, NAME-2, NAME-3 ... etc if you checked the LABEL VARIABLES option.
  38.  
  39. *** VERY IMPORTANT
  40.     -------------- 
  41. All the variables selected as categorical (Control Key Down) must be done in ASCENDING ORDER.
  42. If you try to select,for example, variable 6 if you previously selected a variable whose
  43. column number es equal or less than variable 6 the program beeps, the model window will be CLEARED and You'll have to start the variables selection again. This rule is also applied when in a model you combine categoricial with non-categorical variables. Non-categorical variables alone may be selected in any order ***
  44.  
  45.  
  46. I was compelled to add this option to my program because a common error I observed in Survival analysis is the use of categorical variables 'as is' as covariates in regression models.
  47. You should be aware that if you use this type of variables you are making 'a priori' assumption of a lineal dependence of the hazard function with the different values of the categorical variable, a fact that most of the times is wrong (I repeat wrong), unless otherwise  demonstrated. 
  48. If you use the INDICATOR coding scheme you compare the effect of a particular category with some other category taken as reference (the first one in our case). The value and sign of the new coefficients will tell you if that particular category increases (positive values) or decreases (negative values) the chance of survival.The value of the coefficients for the reference category (the first one) is 0 and is not displayed. 
  49. If you use the DEVIATION coding scheme you compare a particular category with the average effect of all categories. The coefficient for the reference category (first) is calculated as the negative value of the sum of all coefficients for that category.
  50. Use the TEST OF HYPOTHESIS option to assess the joint effect upon hazard of the differente categories of the transformed variables or the different combinations of the covariates that you consider significant in your particular model. 
  51.  
  52. ** YOU CAN'T IMAGINE HOW MUCH YOUR RESULTS AND CONCLUSIONS MAY CHANGE IF YOU USE AN INAPPROPRIATE CODING OF YOUR VARIABLES WITH COX'S OR PARAMETRIC REGRESSION ANALYSIS **
  53.  
  54. HERE ARE MY RECOMENDATIONS:
  55.  
  56. 1) USE BINARY VARIABLES (0,1) WHENEVER POSSIBLE.
  57.  
  58. 2) NEVER USE CATEGORICAL VARIABLES AS COVARIATES. TRANSFORM THEM INTO INDICATOR OR DEVIATION VARIABLES WITH THE ABOVE OPTIONS.
  59.  
  60. 3) IF YOU USE NUMERICAL VARIABLES, MAKE AN ALTERNATIVE ANALYSIS BY TRANSFORMING THEM INTO  DIFFERENT GROUPS OR  CATEGORIES WITH THE 'MAKEBINS' MACRO (You'll love it) AND THEN TRANSFORMING THE CATEGORIES INTO INDICATOR OR DEVIATION VARIABLES. (Many times the effect of numerical variables upon the chance of survival is only significant for a limited interval of values, for example, between 60-70 years but not below or above that AGES.
  61. If you obtain a significant P value for a numerical variable and you don't explore this possibility you would come to the conclusion, otherwise wrong, that the chance of survivaL decreases or increases for decreasing or increasing age values).
  62.  
  63. 4) I PERSONALLY PREFER THE DEVIATION CODING SCHEME. DONT ASK ME WHY
  64.  
  65. 5) NEVER BECOME A SLAVE OF THE 'P < 0.05' EXPRESSION OR LET IT BE A SUBSTITUTE OF YOUR NEURONS
  66.    OR THE COMMON SENSE (WHICH, UNFORTUNATELY, IS LACKING IN MEDICINE IN THE LAST TIMES).
  67.  
  68. 6) MODELLING THE RISK IS THE BEST CHALLANGE AND THE BEST WAY TO TEST YOUR KNOWLEDGE
  69.    ON A PARTICULAR CLINICAL INVESTIGATION PROBLEM. USE THE LIKELIHOOD RATIO TEST TO ASSESS
  70.    IF A GIVEN COVARIATE IN A MODEL WITH NO SIGNIFICANT P VALUE SHOULD BE LEFT OR REMOVED
  71.    FROM THE MODEL.
  72.  
  73. 7) STICK ALWAYS TO THE BASIC PRINCIPLE OF SCIENCE: THE 'PARSIMONY', AND TRY TO DESCRIBE YOUR
  74.    PROBLEM WITH SIMPLE MODELS AND USING THE LEAST POSSIBLE NUMBER OF VARIABLES. 
  75.  
  76. 8) REMEMBER THAT 'CHAOS THEORY' STATES THAT COMPLEX AND NON-LINEAL SYSTEMS (AS IT HAPPENS IN
  77.    MOST BIOLOGICAL SYSTEMS) ARE UNPREDICTABLE. THEREFORE,  DON'T THINK THAT YOUR PARTICULAR MODEL 
  78.    MAY BE USEFUL FOR EXACT PREDICTIONS AND THAT MINIMAL CHANGES (THE BUTTERFLY EFFECT) MAY 
  79.    RADICALLY CHANGE THE RESULT OF YOUR PREDICTIONS.
  80.  
  81.  
  82. New macros added to version 6.0.2 :
  83.  
  84. • SURVPLOT; activates the plot of both Kaplan-Meier and Model Survival function. It
  85.      must be used before the ESTIMATE macro command. This macro substitutes the
  86.      GRAPHPLOT('true','false') command of previous versions.
  87.  
  88. • LOGPLOT; activates the plot of Log -(Log) of Survival function, which is used for
  89.      testing the proportionality assumption.It must be used after the ESTIMATE macro
  90.      command
  91.  
  92. • INTPLOT(number); actives the plot of the Confidence Intervals for the current
  93.      survival function. It must be used after the ESTIMATE command. 'number' is 1 for
  94.      95% CI and 2 for 99% CI.
  95.  
  96. • RESPLOT; activates the plot of the Cumulative Function for Residuals, which is
  97.      used to Test the goodness of fit of data to model.It must also be used after the
  98.      ESTIMATE macro command.
  99.  
  100. • SAVEPICT('name') saves the picture displayed in the active plot window to disk
  101.      in the same folder than the application. This command should be used after the
  102.      SURVPLOT, INTPLOT, LOGPLOT and RESPLOT macro commands, if you pretend to make
  103.      different survival analysis with a single macro and want to save the graphical
  104.      output.This macro also closes the active Plot window after saving to the disk. 
  105.      If you use an empty string as the 'name' argument, until you start a new analysis
  106.      the graphic plots ar saved as Kaplan-Meier.PICTn, Model.PICTn, LogLog.PICTn,
  107.      Intervals.PICTn and Residuals.PICTn, where 'n' is automatically increased for
  108.      each saved file of the same graphic type.
  109.      Use a Path if you want the pictures saved in a different folder
  110.      This option is not available with the Macro Command submenu.
  111.  
  112. • RUNMACRO(number); excutes the macro located in the position 'number' in the
  113.      Macro Menu. Useful for linking different macros in complex automated survival
  114.      analysis. Read carefully the macros in the 'Survival Macros' to learn how to
  115.      use these commands.
  116.  
  117. • SORTBY(column1,column2); sorts data array in ascending order by 'column1' and
  118.      'column2'. If you put a zero for the value in 'column2' the data array is only
  119.      sorted by the ascending order of values in 'column1'.
  120.  
  121. • CLEAR; clears the active output window. This option is not available with the
  122.      Macro Command submenu for System versions less than 7.xx.
  123.  
  124. • FIXDATA; makes permanente the changes in data array. You need to reload your data
  125.      file if you want your original data back in memory.
  126.  
  127. • CATEGORIES(Var1,var2,..option). Indentifies the categorical variables in the data array included in the model that have to be transformed into DEVIATION (option = 0) or INDICATOR (option = 1) variables.
  128.  
  129. STATISTICAL MACROS:
  130.  
  131. This macros help a lot for an on line assessment of summary statistics of our
  132. data array in memory. Using these macros with standar Pascal procedures you may
  133. even compute other statistical Tests and compute the exact probability associated
  134. to the test value. ¿ DO YOU DARE ? 
  135.  
  136.  
  137. •STAT(var,var, ...) computes descriptive statistics (average, SD, SE, Min,Max
  138.     and Range) for the specified 'vars'. If you use a minus sign as argument (-) the
  139.     statistics for all variables in the active data array are computed.
  140.  
  141. •CHITEST(var1,var2); computes a Chi-Square Test for categories in the 'var1' column
  142.     of the data array by the categories in the 'var2'column of the data array.
  143.     Results are presented in a contingency table where the rows are the max number of
  144.     categories in 'var1' and the columns the max number of categories in 'var2'
  145.     The maximum number of categories is seven and the categories should be
  146.     numerated from 1 ....... n categories.
  147.  
  148. •TTEST(var1,var2,[Var3]); computes a Student T-Test betwen Var1 and Var2. If you
  149. use the same value for Var1 and Var2 and use Var3, which is optional, a T-Test is
  150. computed for the groups in Var3. The number of groups must be two (use the RECODE or
  151. COMPUTE MACRO if necessary) otherwise you'll get an error message.
  152.  
  153.  
  154. •CHIPROB(chi,df); computes the exact  P value for ChiSquare distribution 'chi' with
  155.     'df' degrees of freedom.
  156.  
  157. •FPROB(F,df1,df2); computes the exact  P value for F distribution 'F' with 'df1' and
  158.     'df2' degrees of freedom.
  159.  
  160. •NORMPROB(Z); computes the exact  P value for Normal distribution 'Z'.
  161.  
  162. •TPROB(T,df); computes the exact  P value for Student T distribution 'T' with
  163.     'df' degrees of freedom.
  164.  
  165. You may acces the numerical results of these Tests for further processing within
  166. a standard pascal procedure or macro with the TEMP[] Token as follows:
  167.  
  168. ==============================================================================                                  
  169.                                                                    Temp[1]     Temp[2]    Temp[3]   Temp[4]   Temp[5]   Temp[6]
  170.  
  171. -CHITEST          Chi-Value   P-value      df         -          -         -
  172. -TTEST                  T-Value     P-Value      df
  173. -CHIPROB          Chi-Value   P-Value      df         -          -         -
  174. -NORMPROB         Z-Value     P-Value      -          -          -         -
  175. -TPROB            T-Value     P-Value      df         -          -         -
  176. -FPROB            F-Value     P-Value      df1        df2        -         -
  177. -STAT(x)          Mean(x)     SD(x)        SE(x)    Min(x)    Max(x)    Range(x)
  178. ------------------------------------------------------------------------------Example
  179.  
  180.     if Temp[2] < 0.05 the RUNMACRO(2) else EXIT;
  181.  
  182. Bug corrections 
  183.  
  184. • a bug that prevented to save the model when the number of selected vars was ONE has been fixed
  185. • a bug that bombed when trying to save the Data array as 'Application File' under system 6.7x has been fixed.
  186.  
  187.  
  188.  
  189. Survival Version 6.1.1  (January, 1996)
  190.  
  191. This version supports Parametric Survival Analysis with Exponential, Weibull and
  192.  Log-Normal models.
  193.  
  194. Survival Version 6.1.2 (March, 1996)
  195.  
  196.  • Plot of Residuals, 95% I.C. Intervals and Survival Functions (Survival, Density and   Hazard) have been implemented for Parametric Survival analysis.
  197. • The Survival Function for a given Parametric is plotted now by default for the mean covariate value if you don't specifiy a covariate pattern. This avoids the ragged aspect of the graphics in Version 6.1.1.
  198.  •A new macro for automated survival analysis with parametric models has been added.
  199.  
  200.   Its sintax is: PARAMETRIC('ModelType',option1,option2,option3,sigma);
  201.  
  202.  'Model Type is the the type of Parametric Model:
  203.        •Set 'ModelType' to 'exponential' to fit data to a exponential model
  204.          •Set 'ModelType' to 'weibull' to fit data to a two Parameter Weibull model
  205.        •Set 'ModelType' to 'lognormal' to fit data to a Log-Normal model
  206.  
  207.  'option1', 'option2' and 'option3' are boolean expressions:
  208.         •Set 'option1' to true if you want to use a constant term. This option should 
  209.         always b true if you include covariates in the model
  210.         •Set 'option2' to true to center the covariates values around their mean value
  211.           •Set 'option3' to true if you want the iterations to be printed in the output window
  212.  
  213.  'sigma' is the initial value for estimation of the model's sigma term. Should be set to 
  214.   1 unless you have convergence problems
  215.  
  216.  Example:  PARAMETRIC('weibull',true,false,false,1);
  217.  
  218. This macro command fits your survival data to a parametric Weibull model with a constant term and  initial sigma value = 1
  219. You have to define the status and time variable and the covariates (if any) as in any Cox regression analysis before the PARAMETRIC macro. If you don't include covariates the survival function for the null model will be computed. See examples in the Survival Macros
  220.          
  221. •Cosmetic changes have be done in some Dialog and Alert Windows and minor typhos have been corrected.
  222. •Plot of residuals and Survival Functions have been changed. Now individual points are plotted insted of a continuos line.
  223.  
  224.  Survival version 6.1.3  (June 96)
  225.  
  226. •The user interface has been modified to make it more friendly, easier to use and
  227. fully addapted to the Mac User's Interface specifications.
  228.  
  229. • Now PopUp menus are used within the Define Model Dialog Box:
  230.      • To control the numerical output to the active Outpout Window
  231.      • To chose the different Time Units
  232.      • To Export the diferente survival functions and the current survival model
  233.      • To edit the name of the selected covariate labels, group labels, and to enter
  234.        the values for a given covariate pattern and initial coefficient estimates.
  235.  
  236. • Labels for the variables can be included in the data file. You may use a Tab delimited
  237. text file or a binary file. 
  238. In the first instance follow this steps:
  239.     - include the variables labels in the first row of the data file delimited with Tabs;         
  240.          they must match the number of variables. The program looks for data starting with 
  241.      an alphabetic character in the first row and convert them to  labels. You may use 
  242.      also use numeric characters and the symbols '%, $, #, /, -, _, &, *'. Notice that he 
  243.      period  "." symbol can't be used within a label. The name of the label is truncated to
  244.      the first 8 characters (Example: Age, Stage_1, Grade$, etc).
  245.     - Save the File as a binary File. The variable's labels are included as a LABL resource
  246.       in the resource fork of the data file.
  247. In the second instance follow this steps:
  248.     -  Load a Text File or a Binary File
  249.     -  From the Macro Command window issue the following macro:
  250.                             varlabel('label1', label', 'label3', ....etc)
  251.           Label must be entered as quoted strings and should match the  number of variables
  252.       in the data file; otherwise you'll get an error message.
  253.       Save the new data File with the Save File as option from the File Menu
  254.        If you want to change the name of the variables included in a model, chose 
  255.        Edit Covariate Labels from the PopUp menu in the Define Model dialog box.
  256.  
  257. Now when you list the variables in the variables window of the Define model
  258. dialog box they will be shown with their labels and in all subsequent outputs as well.
  259.  
  260. • Options have been added in the File menu to Delete a File or to add an Info window 
  261.   to to the current file. The information is saved as an INFO resource in the resource  
  262.   fork of the Data File and its length is limited to 256 characters.
  263.  
  264. • Now you can chose the value to be used as reference when transforming categorical
  265. variables into indicator or deviation variables. Just put the value you want in the
  266. edit field to the right of the Use Indicator Variable check box before selecting the
  267. variable you want to transform from the variables window (remember to press the
  268. Option Key Down).
  269.  
  270. • An option has been added to append to the data file in memory the values of the
  271. residuals obtained in the last analysis when using parametric models. To keep this
  272. values Save again the data file with the same name or a different name as a binary file or a tab delimited text file. If you use labels for the variables, residuals will be
  273. added to the last column of the data file under the label 'RESIDS'
  274.  
  275. • Now you can make bivariate plots of the variables in the current data file. Select
  276. this option from the Options item of the File Menu. Uncheck the Zero Value for X-Y
  277. origin box from the dialog window if you plot residuals, since they have both
  278. postive and negative values; otherwise negative values would be excluded from the
  279. plot.
  280.  
  281. • Very Important. Use the command STAT(*) to display the summary statistics for
  282. all variables in the current data file insted of STAT(-).
  283.  
  284.  
  285. ********************************************************************
  286. I CONSIDER  VERSION 6.1.3 AS THE END PRODUCT. GOD KNOWS THAT IT COSTED ME SWEATS AND BLOOD AND LOTS OF TIME AND FRUSTATION, BUT I'LL BE HAPPY IF IT IS USEFUL EVEN FOR A SINGLE PERSON.
  287.  
  288. I'M OPENED TO SUGGESTIONS AND CONTRIBUTIONS TO ENHANCE THE PROGRAM, PROVIDED THAT IT HAS SOME REASONABLE LEVEL OF DIFFUSION IN THE NET (WHO KNOWS ?)
  289.  
  290. A FULL TUTORIAL WITH THE BASICS OF SURVIVAL ANALYSIS WITH PARAMETRIC AND NOT PARAMETRIC MODELS IS UNDER DEVELOPMENT AND ADDRESSED TO PEOPLE (LIKE ME 10 YEARS BEFORE) WITH MINIMAL MATHEMATICAL  AND STATISTICAL BACKGROUND. IT WILL BE POSTED TO SUMEX AS SURVIVAL.TUTORIAL.HQX OR INCLUDED IN A PACK WITH THE NON FPU VERSION OF THE
  291. PROGRAM FOR THE POWER MAC USERS.
  292.  
  293.  ! PLEASE TRASH ALL PREVIOUS VERSIONS ! 
  294.  
  295.  ********************************************************************
  296.   
  297.  Report any problem or bug you may detect to:
  298.  
  299.   Manuel Urrutia Avisrror, M.D., P.H.D
  300.   Catedratic of Urology
  301.   University of Salamanca - Department of Urology
  302.   Salamanca - SPAIN
  303.   e-mail: urrutia@gugu.usal.es 
  304.